package com.aiyige.model.sns;

import android.text.TextUtils;

/**
 * Created by xiachao on 2018/1/23.
 */

public class Comment {

    /**
     * 留言类型
     */
    public final static String moment = "moment";


    /**
     * 回复留言
     */
    public final static String comment = "comment";

    String id;
    String subject;
    String originObjectId;
    String objectId;
    String objectType;
    String content;
    String creator;
    Long createTime;
    StatisticsBackup statisticsBackup;
    CreatorBackup creatorBackup;
    Comment objectBackup;
    MineBackup mineBackup;


    String unSubmitContent;

    int status;// 删除:0    有效：1

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    /**
     * 留言是否有效
     * @return
     */
    public boolean isValid() {
        return status == 1;
    }



    public String getUnSubmitContent() {
        return unSubmitContent;
    }

    public void setUnSubmitContent(String unSubmitContent) {
        this.unSubmitContent = unSubmitContent;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getOriginObjectId() {
        return originObjectId;
    }

    public void setOriginObjectId(String originObjectId) {
        this.originObjectId = originObjectId;
    }

    public String getObjectId() {
        return objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    public String getObjectType() {
        return objectType;
    }

    public void setObjectType(String objectType) {
        this.objectType = objectType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public StatisticsBackup getStatisticsBackup() {
        return statisticsBackup;
    }

    public void setStatisticsBackup(StatisticsBackup statisticsBackup) {
        this.statisticsBackup = statisticsBackup;
    }

    public CreatorBackup getCreatorBackup() {
        return creatorBackup;
    }

    public void setCreatorBackup(CreatorBackup creatorBackup) {
        this.creatorBackup = creatorBackup;
    }

    public Comment getObjectBackup() {
        return objectBackup;
    }

    public void setObjectBackup(Comment objectBackup) {
        this.objectBackup = objectBackup;
    }

    public MineBackup getMineBackup() {
        return mineBackup;
    }

    public void setMineBackup(MineBackup mineBackup) {
        this.mineBackup = mineBackup;
    }


    /**
     * 点赞留言数
     * Created by xiachao on 2018/1/23.
     */
    public class StatisticsBackup {
        /**
         * 点赞数
         */
        long praiseCount;
        /**
         * 留言数
         */
        long commentCount;

        public long getPraiseCount() {
            return praiseCount;
        }

        public void setPraiseCount(long praiseCount) {
            this.praiseCount = praiseCount<=0?0:praiseCount;
        }

        public long getCommentCount() {
            return commentCount;
        }

        public void setCommentCount(long commentCount) {
            this.commentCount = commentCount;
        }
    }

    public class CreatorBackup {
        String id;
        String name;
        String avatar;
        int level;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getAvatar() {
            return avatar;
        }

        public void setAvatar(String avatar) {
            this.avatar = avatar;
        }

        public int getLevel() {
            return level;
        }

        public void setLevel(int level) {
            this.level = level;
        }
    }

    public class MineBackup {

        String praiseId;

        public boolean iAmPraised() {
            return !TextUtils.isEmpty(praiseId);
        }

        public String getPraiseId() {
            return praiseId;
        }

        public void setPraiseId(String praiseId) {
            this.praiseId = praiseId;
        }
    }
}
